home *** CD-ROM | disk | FTP | other *** search
/ Celebration Sounds / Celebration Sounds.iso / pc / startup / startup.dir / Lingo_3_buttons.ls < prev    next >
Encoding:
Text File  |  1997-11-07  |  2.5 KB  |  66 lines

  1. on hValidClick01
  2.   set tUpState to the number of member the memberNum of sprite the clickOn of castLib the castLibNum of sprite the clickOn
  3.   set tDownState to tUpState + 1
  4.   set the memberNum of sprite the clickOn to tDownState
  5.   updateStage()
  6.   repeat while the stillDown
  7.     set tMemberNumber to the number of member the memberNum of sprite the clickOn of castLib the castLibNum of sprite the clickOn
  8.     if (tMemberNumber = the mouseCast) and (rollOver(the clickOn) = 1) then
  9.       set the memberNum of sprite the clickOn to tDownState
  10.       hChangeCursor("finger cursor")
  11.     else
  12.       set the memberNum of sprite the clickOn to tUpState
  13.       hChangeCursor("arrow")
  14.     end if
  15.     updateStage()
  16.   end repeat
  17.   set tMemberNumber to the number of member the memberNum of sprite the clickOn of castLib the castLibNum of sprite the clickOn
  18.   if (tMemberNumber = the mouseCast) and (rollOver(the clickOn) = 1) then
  19.     set tButtonDown to 1
  20.   else
  21.     set tButtonDown to 0
  22.   end if
  23.   set tDelayTimer to the ticks + (60 / 4)
  24.   repeat while the ticks < tDelayTimer
  25.   end repeat
  26.   set the memberNum of sprite the clickOn to tUpState
  27.   updateStage()
  28.   return tButtonDown
  29. end
  30.  
  31. on hValidClick02
  32.   set tRolloverState to the number of member the memberNum of sprite the clickOn of castLib the castLibNum of sprite the clickOn
  33.   set tDownState to tRolloverState + 1
  34.   set tUpState to tRolloverState - 1
  35.   set the memberNum of sprite the clickOn to tDownState
  36.   updateStage()
  37.   repeat while the stillDown
  38.     set tMemberNumber to the number of member the memberNum of sprite the clickOn of castLib the castLibNum of sprite the clickOn
  39.     if (tMemberNumber = the mouseCast) and (rollOver(the clickOn) = 1) then
  40.       set the memberNum of sprite the clickOn to tDownState
  41.       hChangeCursor("finger cursor")
  42.     else
  43.       set the memberNum of sprite the clickOn to tUpState
  44.       hChangeCursor("arrow")
  45.     end if
  46.     updateStage()
  47.   end repeat
  48.   set tMemberNumber to the number of member the memberNum of sprite the clickOn of castLib the castLibNum of sprite the clickOn
  49.   if (tMemberNumber = the mouseCast) and (rollOver(the clickOn) = 1) then
  50.     set tButtonDown to 1
  51.     set tDelayTimer to the ticks + (60 / 4)
  52.     repeat while the ticks < tDelayTimer
  53.     end repeat
  54.     set the memberNum of sprite the clickOn to tRolloverState
  55.     updateStage()
  56.   else
  57.     set tButtonDown to 0
  58.     set tDelayTimer to the ticks + (60 / 4)
  59.     repeat while the ticks < tDelayTimer
  60.     end repeat
  61.     set the memberNum of sprite the clickOn to tUpState
  62.     updateStage()
  63.   end if
  64.   return tButtonDown
  65. end
  66.